using System;

namespace Framework
{
    public class ExecuteAction<T> : Behavior<T>
    {
        private Func<T, TaskStatus> _action;

        public ExecuteAction(Func<T, TaskStatus> action)
        {
            _action = action;
        }
        
        public override TaskStatus Update(T context)
        {
            return _action(context);
        }
    }
}